part of '../widgets.dart';

/// 基于字体的图标集，可以通过 Icon 组件使用，也可以在其他组件中通过 icon 属性引用。
class VanIcon extends StatelessWidget {
  /// props - 图标名称或图片链接
  final IconData? data;

  /// props - 是否显示图标右上角小红点(默认: false)
  final bool dot;

  /// props - 图标右上角徽标的内容
  final String? badge;

  /// props - 自定义徽标的属性，传入的对象会被透传给 Badge 组件的 props
  final dynamic badgeProps;

  /// props - 图标颜色
  final String? color;

  /// props - 图标大小
  final double? size;

  /// events - 点击图标时触发
  final Function()? onClick;

  const VanIcon({
    super.key,
    this.data,
    this.dot = false,
    this.badge,
    this.badgeProps,
    this.color,
    this.size,
    this.onClick,
  });

  VanIcon.name({
    super.key,
    required int codePoint,
    String fontFamily = kVanIconFontFamily,
    this.dot = false,
    this.badge,
    this.badgeProps,
    this.color,
    this.size,
    this.onClick,
  }) : data = IconData(codePoint, fontFamily: fontFamily);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    throw UnimplementedError();
  }
}
